#include <iostream>

//https://www.nowcoder.com/practice/3b6175426e704c0b9461628b2278631b?tpId=225&tqId=2184206&ru=%2Fpractice%2Feb72dada09de43ceacf93f9a143ee321&qru=%2Fta%2Fprimary-grammar-cpp%2Fquestion-ranking&sourceUrl=https%3A%2F%2Fwww.nowcoder.com%2Fexam%2Foj

using namespace std;

int main() {
    int arr[6] = {0};
    int len = sizeof(arr) / sizeof(int);

    for (int i = 0; i < len; i++) {
        cin >> arr[i];
    }

    for (int i = 0; i < len; i++) {
        int min = arr[i];
        for (int j = i + 1; j < len; j++) {
            if (arr[j] < min)
                swap(min, arr[j]);
        }
        arr[i] = min; //更新每一轮的最小值
    }
    for (int i = 0; i < len; i++) {
        cout << arr[i] << " ";
    }
    cout << endl;
    return 0;
}

